package com.apexedu.sync.engine;

import com.apexedu.sync.engine.impl.SyncEngine;

/**
 * 同步引擎工厂类
 * Created by ly on 2015/1/14.
 */
public class SyncEngineFactory {
    private static ISyncEngine engine = null;

    /* 私有构造方法，防止被实例化 */
    private SyncEngineFactory() {
    }

    /**
     * 初始化
     */
    private static synchronized void syncInit() {
        if (engine == null) {
            engine = new SyncEngine();
        }
    }

    public static ISyncEngine getInstance() {
        if (engine == null) {
            syncInit();
        }
        return engine;
    }
}
